package io.renren.modules.sp.service;

import cn.hutool.db.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.page.PageData;
import io.renren.common.service.CrudService;
import io.renren.modules.sp.dto.SpMatchAreaLimitDTO;
import io.renren.modules.sp.entity.SpMatchAreaLimitEntity;
import io.renren.modules.sp.entity.SpMatchItemEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 赛事省份人数限制
 *
 * @author whc 1@1.com
 * @since 3.0 2025-01-22
 */
public interface SpMatchAreaLimitService extends CrudService<SpMatchAreaLimitEntity, SpMatchAreaLimitDTO> {

    List<SpMatchAreaLimitEntity> queryWrapper(QueryWrapper wrapper);

    //List<SpMatchItemEntity> checkMatchItem(Integer matchId, String matchItemId);

    void validateDate(SpMatchAreaLimitDTO dto);

    boolean checkLimitNum(Integer matchItemId);

    List<Map<String, Object>> queryMatchAreaLimit(Integer matchId, String matchItemId);

    List<SpMatchAreaLimitEntity> queryBy(Integer matchId, Integer matchItemId);

    Long queryMatchItemId(Integer matchId, String matchItemName);

    List<SpMatchAreaLimitEntity> findByMatchId(Integer matchId);

    List<Map<String, String>>  querySpMatchLimit(String season);
    List<Map<String, String>>  querySpMatchLimit3(String season);

    PageData<SpMatchAreaLimitDTO> matchItemPage( @RequestParam Map<String, Object> params);

    List<String> headerList(Integer matchId);

    List<String> productList();

    String getProvinceCode(String name);

    void toSave(SpMatchAreaLimitDTO dto);
}
